//
//  NSMutableAttributedString+RBAdd.h
//  RBDemoProj
//
//  Created by Lan on 2019/1/17.
//  Copyright © 2019年 SummerTea. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <YYText.h>

@interface NSMutableAttributedString(RBAdd)

/*
 自动布局设置下label.preferredMaxLayoutWidth
 highlightColor:如果设置了,点不点击文字都变色
 */
- (void)appendFont: (UIFont *)font
             color: (UIColor *)color
       lineSpacing: (CGFloat)lineSpacing
              text: (NSString *)text
   highlighBgColor: (UIColor *)highlighBgColor
    highlightColor: (UIColor *)highlightColor
         tapAction:(YYTextAction)tapAction
   longPressAction:(YYTextAction)longPressAction;

/*
 自动布局设置下label.preferredMaxLayoutWidth
 contentMode:影响了content,如果不缩放模式,可能会超出attachmentSize,用0
 */
- (void)appendContent: (id)content
          lineSpacing: (CGFloat)lineSpacing
          contentMode:(UIViewContentMode)contentMode
       attachmentSize:(CGSize)attachmentSize
          alignToFont:(UIFont *)font
            alignment:(YYTextVerticalAlignment)alignment
      highlighBgColor: (UIColor *)highlighBgColor
            tapAction:(YYTextAction)tapAction
      longPressAction:(YYTextAction)longPressAction;

@end
